import java.util.*;

public class DuplicateFolders {
    static class Folder {
        String name;
        Map<String, Folder> children;

        public Folder(String name) {
            this.name = name;
            this.children = new HashMap<>();
        }

        public void addPath(String[] parts, int index) {
            if (index >= parts.length) {
                return;
            }
            String part = parts[index];
            children.putIfAbsent(part, new Folder(part));
            children.get(part).addPath(parts, index + 1);
        }

        @Override
        public String toString() {
            return name + "/";
        }

        // Generates a unique key for the folder structure
        public String generateKey() {
            List<String> keys = new ArrayList<>();
            for (Folder child : children.values()) {
                keys.add(child.generateKey());
            }
            Collections.sort(keys);
            return String.join(",", keys);
        }
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.nextLine().trim());
        Set<String> paths = new HashSet<>();
        Folder root = new Folder("");

        for (int i = 0; i < n; i++) {
            String path = scanner.nextLine().trim();
            paths.add(path);
            String[] parts = path.split("/");
            root.addPath(parts, 1); // Skip the first empty part from splitting
        }

        Map<String, List<String>> structureMap = new HashMap<>();
        findDuplicates(root, structureMap);

        List<String> duplicates = new ArrayList<>();
        for (List<String> list : structureMap.values()) {
            if (list.size() > 1) {
                duplicates.add(list.get(0)); // Add the first path as representative
            }
        }

        Collections.sort(duplicates);
        if (duplicates.isEmpty()) {
            System.out.println("NotFound");
        } else {
            for (String folder : duplicates) {
                System.out.println(folder);
            }
        }

        scanner.close();
    }

    private static void findDuplicates(Folder folder, Map<String, List<String>> structureMap) {
        String key = folder.generateKey();
        if (!key.isEmpty()) {
            structureMap.putIfAbsent(key, new ArrayList<>());
            structureMap.get(key).add(folder.toString());
        }
        for (Folder child : folder.children.values()) {
            findDuplicates(child, structureMap);
        }
    }
}

